<template>
  <div class="box">
    <h3>Child1 - 接收数据</h3>
  </div>
</template>

<script lang="ts" setup>
import PubSub from 'pubsub-js';


const receiveData = (type: string, data: string) => {
  console.log(type, data);

}


PubSub.subscribe('receiveData', receiveData)




</script>
